package com.dayu.gulimall.order.config;

import com.dayu.gulimall.order.intecepter.OrderIntercepter;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author dayu
 * @version 1.0
 * @email dayu007@foxmail.com
 * @date 2021/4/24 17:20
 * @description
 */
@Component
public class OrderWebConfigration implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new OrderIntercepter()).addPathPatterns("/**");
    }
}
